<?php $this->_extends('_layouts/default_layout'); ?>
<?php echo $this->_block('title')?>
<?php echo $config['sitename'] ?>
<?php echo $this->_endblock()?>
<?php echo $this->_block('meta')?>
<link
	rel="stylesheet" href="<?php echo $_BASE_DIR; ?>css/index.css"
	type="text/css" />
<script
	src="<?php echo $_BASE_DIR; ?>js/scroll.js" type=text/javascript></script>
<script
	src="<?php echo $_BASE_DIR; ?>js/base.js" type=text/javascript></script>
<script
	src="<?php echo $_BASE_DIR; ?>javascripts/jquery.min.js"
	type=text/javascript></script>
<meta
	name="keywords" content="<?php echo $config['keyword'] ?>" />
<meta
	name="description" content="<?php echo $config['description'] ?>">
<script>
	function show_inbuild(obj, index) {
		var arry=new Array("cz","tf","ta","r","qt");
		for(i=0;i<5;i++)
		{
			var img=document.getElementById("image_tf");

			if(index==arry[i])
			{
				document.getElementById("table_"+arry[i]).style.display="block";
				document.getElementById("image_"+arry[i]).className="image_"+arry[i]+"_2";
			}
			else
			{
				document.getElementById("table_"+arry[i]).style.display="none";
				document.getElementById("image_"+arry[i]).className="image_"+arry[i]+"_1";
			}
		}
	}
	</script>
<style type="text/css">
<!--
#navList a.top_banner_on0,#navList a.top_banner_on0:hover{
    background: url("<?php echo $_BASE_DIR; ?>images/website/image/index_top_bg.gif") no-repeat scroll left -50px transparent;
    color: #008EDA;
}
.STYLE1 {
	color: #000000
}

.image_tf_1 {
	background-image:
		url("<?php echo $_BASE_DIR; ?>images/website/image/index_inbuild.gif");
	background-position: 300% 100%;
}

.image_tf_2 {
	background-image:
		url("<?php echo $_BASE_DIR; ?>images/website/image/index_inbuild.gif");
	background-position: 300% 0;
}
-->
</style>
<?php echo $this->_endblock()?>
<?php $this->_block('center'); ?>

<div id="maincon" style="position: relative; z-index: 100;">
	<div id="con_banner">
		<div id="con_upon">
			<div id="con_upon_con">
				<a href="#" style="position: relative;"><img
					src="images/website/image/index_free_03.jpg" /> </a><br />
				<div class="ser-pic">
					已有<span id="downnum"> <?php echo floor(time()/80);?> </span>人参加体验，你还等什么？
				</div>
				<ul>
					<li><a href="<?php echo url("users/reg")?>"
						style="position: relative;">还未注册？</a></li>
					<li><a href="<?php echo url("default::download")?>"
						style="position: relative;">下载</a></li>
				</ul>
			</div>
		</div>
		<div id="flash_show_out">
			<div id="flash_show">

				<div id="flash_img">
					<a href="pay/sale10.html" target="_blank"><img
						src="images/pay/image/sale10/banner-index.jpg" name="inpic"
						id="inpic" /> </a>
				</div>


				<ul id="flash_btn">
					<li onclick="figdx(0)">1</li>
					<li onclick="figdx(1)">2</li>
					<li onclick="figdx(2)">3</li>
					<li onclick="figdx(3)">4</li>
					<li onclick="figdx(4)">5</li>
				</ul>
			</div>
		</div>
	</div>
	<div class="clear"></div>
	<div>
		<img src="images/website/image/index_scroll_b_07.jpg" />
	</div>
	<div class="content">
		<div id="con_t_l">
			<h3>
				<strong>精彩活动</strong> 总有一款适合你
			</h3>
			<div class="clear"></div>
			<ul>
			<?php foreach ($img_activite as $k=>$v):?>
				<li class="taocan_li"><a href="<?php echo $v->link;?>"><img
						src="<?php echo $_BASE_DIR.$v->imgurl;?>" /> </a><img
					src="images/website/image/index_area_line.gif" /></li>

					<?php endforeach;?>
			</ul>
			<div class="clear"></div>
			<div>
				<ul id="inbuild_tab">
					<li onmouseover="show_inbuild(this, 'cz')"><a
						href="pay/sale10.html" id="image_cz" class="image_cz_2">点卡特惠</a></li>
					<li onmouseover="show_inbuild(this, 'tf')"><a href="pay/sale4.html"
						id="image_tf" class="image_tf_1">积分特惠</a>
					</li>
					<li style="display: none;" onmouseover="show_inbuild(this, 'ta')"><a
						href="#" id="image_ta" class="image_ta_1">全时包月套餐</a></li>
					<li style="display: none" onmouseover="show_inbuild(this, 'r')"><a
						href="#" id="image_r" class="image_r_1">费率折扣卡</a></li>
					<li style="display: none" onmouseover="show_inbuild(this, 'qt')"><a
						href="pay/biz.do-id=13.htm" id="image_qt" class="image_qt_1">手机拨打</a>
					</li>

				</ul>
			</div>
			<div class="clear"></div>
			<div class="inbuild_table">
				<div id="table_cz">
					<!--chongzhi-->
					<table style="width: 628px; *width: 630px;" border="1"
						cellpadding="0" cellspacing="0" bordercolor="#B3E3F9">
						<tr height="36">
							<td width="24%" bgcolor="#EAF7FD"><strong>话费金额</strong></td>
							<td width="30%" bgcolor="#EAF7FD"><strong>实际增加话费</strong></td>
							<td width="25%" bgcolor="#EAF7FD"><strong>有效期</strong></td>
							<td width="156" bgcolor="#EAF7FD"><strong>相关操作</strong></td>
						</tr>


						<?php
						$indexCard = Product::find('type = 0 and issell = 1 and isshow = 1 ')->order("weight desc")->top(4)->getAll();
						?>
						<?php foreach ($indexCard as $K=>$v):?>
						<tr height="30">
							<td><?php echo $v->price/100?>元</td>
							<td><font
								style="vertical-align: 0px !important; vertical-align: middle;"><?php echo $v->send_price;?>元</label>
							
							</td>
							<td>1年</td>
							<td><a href="<?php echo url("users/pay",array('gid'=>$v->id))?>"
								rel="nofollow">马上行动</a></td>
						</tr>

						<?php endforeach;?>
						<tr height="30">
							<td colspan="4" bgcolor="#EFF8FF"
								style="text-align: left; text-indent: 25px;"><img
								src="images/website/image/index_bell.gif" />活动特惠，截止日期2012-3-1日</td>
						</tr>
					</table>
				</div>
				<div id="table_tf" style="display: none;">
					<!--freetime-->
					<table style="width: 628px; *width: 630px;" border="1"
						cellpadding="0" cellspacing="0" bordercolor="#B3E3F9">
						<?php
						$indexCard = Product::find('type = 1 and issell = 1 and isshow = 1 ')->order("weight desc")->top(4)->getAll();
						?>
						<tr height="36">
							<td width="24%" bgcolor="#EAF7FD"><strong>积分产品名称</strong></td>
							<td width="30%" bgcolor="#EAF7FD"><strong>支付积分</strong></td>
							<td width="25%" bgcolor="#EAF7FD"><strong>支付现金</strong></td>
							<td width="156" bgcolor="#EAF7FD"><strong>相关操作</strong></td>
						</tr>
						<?php foreach ($indexCard as $k=>$v):?>
						<tr height="37">
							<td><?php echo $v->title?></td>
							<td><?php echo $v->pointer?>分</td>
							<td><?php echo $v->price/100?>元</td>
							<td><a
								href="<?php echo url("users/point",array('gid'=>$v->id))?>">马上行动</a>
							</td>
						</tr>
						<?php endforeach;?>

						<tr height="30">
							<td colspan="5" bgcolor="#EFF8FF"
								style="text-align: left; text-indent: 25px;"><img
								src="images/website/image/index_bell.gif" />闲时时段: 0:00
								-18:00，全时时段:0:00-24:00 限拨打中国大陆地区. <a href="pay/sale4.html"
								style="display: inline; background-image: none; margin: 0px;">>查看详情</a>
							</td>
						</tr>
					</table>
				</div>
				<div id="table_ta" style="display: none;"></div>
				<div id="table_r" style="display: none;"></div>
				<!--其他-->
				<div id="table_qt" style="display: none;">
					<!--huibo-->

				</div>
			</div>
		</div>
		<?php echo $this->_element('topnews');?>
	</div>
	<div class="clear"></div>
	<div id="partner" class="style4" style="margin-top: 20px;">
		<h3>合作伙伴</h3>
		<div id="partner_con">
		<?php foreach ($img_link as $k=>$v):?>
			<a href="<?php echo $v->link;?>" target='_blank' rel="nofollow"><img
				src="<?php echo $v->imgurl;?>" class="linkpic" /> </a>
				<?php endforeach;?>

		</div>

	</div>
	<div class="clear"></div>
	<div style="height: 24px; overflow: hidden; margin: 15px 0 12px 0;">
		<div id="marquee" style="height: 168px;">
			<div class="listpro" style="height: 96px;">
				<ul>
				<?php foreach ($char_link as $k=>$v):?>
					<li><a href="<?php echo $v->link?>" target="_blank"><?php echo $v->title?>
					</a></li>
					<?php endforeach;?>

				</ul>
			</div>
		</div>
	</div>
</div>

					<?php $this->_endblock(); ?>
					<?php $this->_block('scripts'); ?>
<SCRIPT>
			function startmarquee(lh,speed,delay) {
				var p=false;
				var t;
				var sh;
				var o=document.getElementById("marquee");
				o.innerHTML+=o.innerHTML;
				o.style.marginTop=0;
				o.onmouseover=function(){p=true;}
				o.onmouseout=function(){p=false;}
				function start(){
					sh = o.offsetHeight;
					o.style.height = sh+"px";
					t=setInterval(scrolling,speed);
					if(!p) 
						o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
				}
				function scrolling(){
					if(parseInt(o.style.marginTop)%lh!=0){
						o.style.marginTop=parseInt(o.style.marginTop)-1+"px";
						
						if(Math.abs(parseInt(o.style.marginTop))>=sh/2){
							o.style.marginTop=0;
						}
					}else{
						clearInterval(t);
						setTimeout(start,delay);
					}
				}
				setTimeout(start,delay);
			}
			startmarquee(24,20,3000);
			
		</SCRIPT>
<script type="text/javascript">
var pics1 = new Array();
pics1[0]=document.createElement("img");
pics1[0].src =  "<?php echo $_BASE_DIR; ?>images/pay/image/sale10/banner-index.jpg";
pics1[1]=document.createElement("img");
pics1[1].src = "<?php echo $_BASE_DIR; ?>images/pay/image/sale1/banner-index.jpg";
pics1[2]=document.createElement("img");
pics1[2].src = "<?php echo $_BASE_DIR; ?>images/pay/image/sale3/banner-index.jpg";
pics1[3]=document.createElement("img");
pics1[3].src = "<?php echo $_BASE_DIR; ?>images/website/image/sms_banner_index.jpg";
pics1[4]=document.createElement("img");
pics1[4].src = "<?php echo $_BASE_DIR; ?>images/pay/image/sale5/banner-index.jpg";

var PicImage=[pics1[0].src,pics1[1].src,pics1[2].src,pics1[3].src,pics1[4].src];
var PicLink=["#","#","#","#","#"];
figdx(0);
</script>
					<?php $this->_endblock(); ?>